package com.ruoyi.user.controller;

import com.ruoyi.user.domain.PassengerUser;
import com.ruoyi.user.service.IPassengerUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;

/**
 * 登录
 *
 * @author ruoyi
 * @date 2024-10-17
 */
@RestController
@RequestMapping("/passengerUser")
@Slf4j
public class PassengerUserController extends BaseController {
    @Autowired
    private IPassengerUserService passengerUserService;


    /**
     * 登录
     *
     * @param
     * @return com.ruoyi.common.core.web.domain.AjaxResult
     * @author wangqingbin
     * @date 2024/10/17 21:47
     */
    @GetMapping("/login")
    public AjaxResult login(@RequestParam(value = "code") String code){
        PassengerUser user = passengerUserService.login(code);
        return success(user);
    }


}
